<%@ Page Language="C#"%>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="Microsoft.VisualBasic" %>
<%
    String naverAPIKey = Request["key"];
    String sValue = Request["query"];
	String sUrl = "http://openapi.map.naver.com/api/geocode.php?key="+naverAPIKey+"&encoding=utf-8&coord=tm128&query="+sValue;
	
	// Whois open API
    HttpWebRequest req = (HttpWebRequest)WebRequest.Create(sUrl);
    req.Credentials = CredentialCache.DefaultCredentials;
	// Get the response.
    using (HttpWebResponse res = (HttpWebResponse)req.GetResponse())
    {
        StreamReader sr = new StreamReader(res.GetResponseStream());
        Response.Write(sr.ReadToEnd());
    }
%>